<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AIfES 2: aiopti_adam_default.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="AIfES_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AIfES 2
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('aiopti__adam__default_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">aiopti_adam_default.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="aiopti__adam__default_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160; </div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#ifndef AIOPTI_ADAM_DEFAULT</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#define AIOPTI_ADAM_DEFAULT</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160; </div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="aiopti__adam_8h.html">basic/base/aiopti/aiopti_adam.h</a>&quot;</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160; </div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="aimath__f32__default_8h.html">basic/default/aimath/aimath_f32_default.h</a>&quot;</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="aimath__q7__default_8h.html">basic/default/aimath/aimath_q7_default.h</a>&quot;</span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160; </div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">#define AIOPTI_ADAM_F32(learning_rate, beta1, beta2, eps) {{{0,},},learning_rate, beta1, beta2, eps}</span></div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">#define AIOPTI_ADAM_Q31(learning_rate, beta1, beta2, eps) {{{0,},},learning_rate, beta1, beta2, eps}</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160; </div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structaiopti__adam__f32.html">aiopti_adam_f32</a>  <a class="code" href="structaiopti__adam__f32.html">aiopti_adam_f32_t</a>;</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="comment">//typedef struct aiopti_adam_q31    aiopti_adam_q31_t;</span></div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160; </div>
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="structaiopti__adam__f32.html">   45</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structaiopti__adam__f32.html">aiopti_adam_f32</a> {</div>
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="structaiopti__adam__f32.html#a4ee5aa66748dc3de06264edf611afe36">   46</a></span>&#160;    <a class="code" href="structaiopti__adam.html">aiopti_adam_t</a> <a class="code" href="structaiopti__adam__f32.html#a4ee5aa66748dc3de06264edf611afe36">base</a>; </div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="structaiopti__adam__f32.html#a7fa6b6264ed55a45f7af8b00eae05f59">   54</a></span>&#160;    <a class="code" href="aimath__f32_8h.html#ad3ffba87614778a1d8ee2314117ff59c">aiscalar_f32_t</a> <a class="code" href="structaiopti__adam__f32.html#a7fa6b6264ed55a45f7af8b00eae05f59">learning_rate</a>; </div>
<div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="structaiopti__adam__f32.html#a1eefe694094134546744d852c420f795">   56</a></span>&#160;    <a class="code" href="aimath__f32_8h.html#ad3ffba87614778a1d8ee2314117ff59c">aiscalar_f32_t</a> <a class="code" href="structaiopti__adam__f32.html#a1eefe694094134546744d852c420f795">beta1</a>; </div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="structaiopti__adam__f32.html#a6f91825b1fa3d8852229565300d0120d">   57</a></span>&#160;    <a class="code" href="aimath__f32_8h.html#ad3ffba87614778a1d8ee2314117ff59c">aiscalar_f32_t</a> <a class="code" href="structaiopti__adam__f32.html#a6f91825b1fa3d8852229565300d0120d">beta2</a>; </div>
<div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="structaiopti__adam__f32.html#ab7512d520c28ccb5fe079e9767abbe2f">   58</a></span>&#160;    <a class="code" href="aimath__f32_8h.html#ad3ffba87614778a1d8ee2314117ff59c">aiscalar_f32_t</a> <a class="code" href="structaiopti__adam__f32.html#ab7512d520c28ccb5fe079e9767abbe2f">eps</a>; </div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160; </div>
<div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="structaiopti__adam__f32.html#a86ca477df4949ba19f88dff95881f2fd">   66</a></span>&#160;    <a class="code" href="aimath__f32_8h.html#ad3ffba87614778a1d8ee2314117ff59c">aiscalar_f32_t</a> <a class="code" href="structaiopti__adam__f32.html#a86ca477df4949ba19f88dff95881f2fd">beta1t</a>; </div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="structaiopti__adam__f32.html#a84f5411ba7618657a0d5a2d155f62eae">   67</a></span>&#160;    <a class="code" href="aimath__f32_8h.html#ad3ffba87614778a1d8ee2314117ff59c">aiscalar_f32_t</a> <a class="code" href="structaiopti__adam__f32.html#a84f5411ba7618657a0d5a2d155f62eae">beta2t</a>; </div>
<div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="structaiopti__adam__f32.html#a02e260a8f1cec862011a285d8af0f9f7">   68</a></span>&#160;    <a class="code" href="aimath__f32_8h.html#ad3ffba87614778a1d8ee2314117ff59c">aiscalar_f32_t</a> <a class="code" href="structaiopti__adam__f32.html#a02e260a8f1cec862011a285d8af0f9f7">one_minus_beta1</a>; </div>
<div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="structaiopti__adam__f32.html#a6cf0c7e58cbeaa620a0323eca2176871">   69</a></span>&#160;    <a class="code" href="aimath__f32_8h.html#ad3ffba87614778a1d8ee2314117ff59c">aiscalar_f32_t</a> <a class="code" href="structaiopti__adam__f32.html#a6cf0c7e58cbeaa620a0323eca2176871">one_minus_beta2</a>; </div>
<div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="structaiopti__adam__f32.html#a146379ac568942afe3a7519491ea6a2b">   70</a></span>&#160;    <a class="code" href="aimath__f32_8h.html#ad3ffba87614778a1d8ee2314117ff59c">aiscalar_f32_t</a> <a class="code" href="structaiopti__adam__f32.html#a146379ac568942afe3a7519491ea6a2b">lrt</a>; </div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;};</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160; </div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160; </div>
<div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="aiopti__adam__default_8h.html#a403603bdc0d77e2d1cbc3fd4cd37880a">  103</a></span>&#160;<a class="code" href="structaiopti.html">aiopti_t</a> *<a class="code" href="aiopti__adam__default_8h.html#a403603bdc0d77e2d1cbc3fd4cd37880a">aiopti_adam_f32_default</a>(<a class="code" href="structaiopti__adam__f32.html">aiopti_adam_f32_t</a> *opti);</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160; </div>
<div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="aiopti__adam__default_8h.html#a0f5a44e9e363b8b8bbb1d3ad6b8e7658">  121</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="aiopti__adam__default_8h.html#a0f5a44e9e363b8b8bbb1d3ad6b8e7658">aiopti_adam_f32_default_begin_step</a>(<a class="code" href="structaiopti.html">aiopti_t</a> *<span class="keyword">self</span>);</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160; </div>
<div class="line"><a name="l00143"></a><span class="lineno"><a class="line" href="aiopti__adam__default_8h.html#a162ef93a1e3dc3c7fc3267dd6862c21b">  143</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="aiopti__adam__default_8h.html#a162ef93a1e3dc3c7fc3267dd6862c21b">aiopti_adam_f32_default_end_step</a>(<a class="code" href="structaiopti.html">aiopti_t</a> *<span class="keyword">self</span>);</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160; </div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;<span class="preprocessor">#endif </span><span class="comment">// AIOPTI_ADAM_DEFAULT</span></div>
<div class="ttc" id="aaimath__f32_8h_html_ad3ffba87614778a1d8ee2314117ff59c"><div class="ttname"><a href="aimath__f32_8h.html#ad3ffba87614778a1d8ee2314117ff59c">aiscalar_f32_t</a></div><div class="ttdeci">float aiscalar_f32_t</div><div class="ttdoc">Scalar for F32 (aif32) data-type.</div><div class="ttdef"><b>Definition:</b> aimath_f32.h:120</div></div>
<div class="ttc" id="aaimath__f32__default_8h_html"><div class="ttname"><a href="aimath__f32__default_8h.html">aimath_f32_default.h</a></div><div class="ttdoc">Math functions for F32  data type, default implementation.</div></div>
<div class="ttc" id="aaimath__q7__default_8h_html"><div class="ttname"><a href="aimath__q7__default_8h.html">aimath_q7_default.h</a></div><div class="ttdoc">Math functions for Q7  data type, default implementation.</div></div>
<div class="ttc" id="aaiopti__adam_8h_html"><div class="ttname"><a href="aiopti__adam_8h.html">aiopti_adam.h</a></div><div class="ttdoc">Base optimizer  implementation of the Adam optimizer</div></div>
<div class="ttc" id="aaiopti__adam__default_8h_html_a0f5a44e9e363b8b8bbb1d3ad6b8e7658"><div class="ttname"><a href="aiopti__adam__default_8h.html#a0f5a44e9e363b8b8bbb1d3ad6b8e7658">aiopti_adam_f32_default_begin_step</a></div><div class="ttdeci">void aiopti_adam_f32_default_begin_step(aiopti_t *self)</div><div class="ttdoc">F32  default implementation of the aiopti.begin_step function for ADAM</div></div>
<div class="ttc" id="aaiopti__adam__default_8h_html_a162ef93a1e3dc3c7fc3267dd6862c21b"><div class="ttname"><a href="aiopti__adam__default_8h.html#a162ef93a1e3dc3c7fc3267dd6862c21b">aiopti_adam_f32_default_end_step</a></div><div class="ttdeci">void aiopti_adam_f32_default_end_step(aiopti_t *self)</div><div class="ttdoc">F32  default implementation of the aiopti.end_step function for ADAM</div></div>
<div class="ttc" id="aaiopti__adam__default_8h_html_a403603bdc0d77e2d1cbc3fd4cd37880a"><div class="ttname"><a href="aiopti__adam__default_8h.html#a403603bdc0d77e2d1cbc3fd4cd37880a">aiopti_adam_f32_default</a></div><div class="ttdeci">aiopti_t * aiopti_adam_f32_default(aiopti_adam_f32_t *opti)</div><div class="ttdoc">Initializes an Adam optimizer  with the F32  default implementation.</div></div>
<div class="ttc" id="astructaiopti__adam__f32_html"><div class="ttname"><a href="structaiopti__adam__f32.html">aiopti_adam_f32</a></div><div class="ttdoc">Data-type specific Adam optimizer  struct for F32 .</div><div class="ttdef"><b>Definition:</b> aiopti_adam_default.h:45</div></div>
<div class="ttc" id="astructaiopti__adam__f32_html_a02e260a8f1cec862011a285d8af0f9f7"><div class="ttname"><a href="structaiopti__adam__f32.html#a02e260a8f1cec862011a285d8af0f9f7">aiopti_adam_f32::one_minus_beta1</a></div><div class="ttdeci">aiscalar_f32_t one_minus_beta1</div><div class="ttdoc">Storage for aiopti_adam.one_minus_beta1 scalar in F32.</div><div class="ttdef"><b>Definition:</b> aiopti_adam_default.h:68</div></div>
<div class="ttc" id="astructaiopti__adam__f32_html_a146379ac568942afe3a7519491ea6a2b"><div class="ttname"><a href="structaiopti__adam__f32.html#a146379ac568942afe3a7519491ea6a2b">aiopti_adam_f32::lrt</a></div><div class="ttdeci">aiscalar_f32_t lrt</div><div class="ttdoc">Storage for aiopti_adam.lrt scalar in F32.</div><div class="ttdef"><b>Definition:</b> aiopti_adam_default.h:70</div></div>
<div class="ttc" id="astructaiopti__adam__f32_html_a1eefe694094134546744d852c420f795"><div class="ttname"><a href="structaiopti__adam__f32.html#a1eefe694094134546744d852c420f795">aiopti_adam_f32::beta1</a></div><div class="ttdeci">aiscalar_f32_t beta1</div><div class="ttdoc">Storage for aiopti_adam.beta1 scalar in F32.</div><div class="ttdef"><b>Definition:</b> aiopti_adam_default.h:56</div></div>
<div class="ttc" id="astructaiopti__adam__f32_html_a4ee5aa66748dc3de06264edf611afe36"><div class="ttname"><a href="structaiopti__adam__f32.html#a4ee5aa66748dc3de06264edf611afe36">aiopti_adam_f32::base</a></div><div class="ttdeci">aiopti_adam_t base</div><div class="ttdoc">Inherited field members from general optimizer struct.</div><div class="ttdef"><b>Definition:</b> aiopti_adam_default.h:46</div></div>
<div class="ttc" id="astructaiopti__adam__f32_html_a6cf0c7e58cbeaa620a0323eca2176871"><div class="ttname"><a href="structaiopti__adam__f32.html#a6cf0c7e58cbeaa620a0323eca2176871">aiopti_adam_f32::one_minus_beta2</a></div><div class="ttdeci">aiscalar_f32_t one_minus_beta2</div><div class="ttdoc">Storage for aiopti_adam.one_minus_beta2 scalar in F32.</div><div class="ttdef"><b>Definition:</b> aiopti_adam_default.h:69</div></div>
<div class="ttc" id="astructaiopti__adam__f32_html_a6f91825b1fa3d8852229565300d0120d"><div class="ttname"><a href="structaiopti__adam__f32.html#a6f91825b1fa3d8852229565300d0120d">aiopti_adam_f32::beta2</a></div><div class="ttdeci">aiscalar_f32_t beta2</div><div class="ttdoc">Storage for aiopti_adam.beta2 scalar in F32.</div><div class="ttdef"><b>Definition:</b> aiopti_adam_default.h:57</div></div>
<div class="ttc" id="astructaiopti__adam__f32_html_a7fa6b6264ed55a45f7af8b00eae05f59"><div class="ttname"><a href="structaiopti__adam__f32.html#a7fa6b6264ed55a45f7af8b00eae05f59">aiopti_adam_f32::learning_rate</a></div><div class="ttdeci">aiscalar_f32_t learning_rate</div><div class="ttdoc">Storage for aiopti.learning_rate scalar in F32.</div><div class="ttdef"><b>Definition:</b> aiopti_adam_default.h:54</div></div>
<div class="ttc" id="astructaiopti__adam__f32_html_a84f5411ba7618657a0d5a2d155f62eae"><div class="ttname"><a href="structaiopti__adam__f32.html#a84f5411ba7618657a0d5a2d155f62eae">aiopti_adam_f32::beta2t</a></div><div class="ttdeci">aiscalar_f32_t beta2t</div><div class="ttdoc">Storage for aiopti_adam.beta2t scalar in F32.</div><div class="ttdef"><b>Definition:</b> aiopti_adam_default.h:67</div></div>
<div class="ttc" id="astructaiopti__adam__f32_html_a86ca477df4949ba19f88dff95881f2fd"><div class="ttname"><a href="structaiopti__adam__f32.html#a86ca477df4949ba19f88dff95881f2fd">aiopti_adam_f32::beta1t</a></div><div class="ttdeci">aiscalar_f32_t beta1t</div><div class="ttdoc">Storage for aiopti_adam.beta1t scalar in F32.</div><div class="ttdef"><b>Definition:</b> aiopti_adam_default.h:66</div></div>
<div class="ttc" id="astructaiopti__adam__f32_html_ab7512d520c28ccb5fe079e9767abbe2f"><div class="ttname"><a href="structaiopti__adam__f32.html#ab7512d520c28ccb5fe079e9767abbe2f">aiopti_adam_f32::eps</a></div><div class="ttdeci">aiscalar_f32_t eps</div><div class="ttdoc">Storage for aiopti_adam.eps scalar in F32.</div><div class="ttdef"><b>Definition:</b> aiopti_adam_default.h:58</div></div>
<div class="ttc" id="astructaiopti__adam_html"><div class="ttname"><a href="structaiopti__adam.html">aiopti_adam</a></div><div class="ttdoc">General Adam optimizer  struct.</div><div class="ttdef"><b>Definition:</b> aiopti_adam.h:56</div></div>
<div class="ttc" id="astructaiopti_html"><div class="ttname"><a href="structaiopti.html">aiopti</a></div><div class="ttdoc">AIfES optimizer interface.</div><div class="ttdef"><b>Definition:</b> aifes_core.h:438</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_1e5d3661ed79af157d57e64a38265d09.html">basic</a></li><li class="navelem"><a class="el" href="dir_6f3c54947e40ccd50db54894d07fbfc0.html">default</a></li><li class="navelem"><a class="el" href="dir_37dfedf0a42dfadb74a0ecf9fa01db6d.html">aiopti</a></li><li class="navelem"><a class="el" href="aiopti__adam__default_8h.html">aiopti_adam_default.h</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
